fix: refresh runtime settings on change#17
Open
enieuwy wants to merge 1 commit intokavinsood:mainfrom
Open
Conversation
Settings onChange handlers saved the raw values but never re-parsed them into the runtime fields used by the sync engine. Exclude patterns and max file size only took effect after a plugin reload. Extract refreshRuntimeSettings() and call it from both onChange handlers and onload().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Changing "Exclude paths" or "Max text file size" in YAOS settings had no effect until the plugin was reloaded. The
onChangehandlers saved the raw values to disk but never updated the runtime fields (this.excludePatterns,this.maxFileSize) used by the sync engine.Fix
refreshRuntimeSettings()on the plugin class — re-parses exclude patterns and recalculates max file size from settingsonChangehandlers in the settings tabonload()init to use the same methodTest plan
tsc --noEmitpassestemplates/, create a file intemplates/— confirm it is excluded from sync immediately (no reload needed)